package cn.intospring.demoapp.ws.demo.dto;

import javax.xml.bind.annotation.XmlType;

import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * Web Service传输User信息的DTO.
 * 
 * 分离Entity类与Web Service接口间的耦合，隔绝entity类的修改对接口的影响。
 * 使用JAXB 2.0的annotation标注JAVA-XML映射，尽量使用默认约定.
 * 
 * @author calvin
 */
@XmlType(name = "User")
public class UserDTO {

	protected Integer id;

	protected String loginName;
	
	protected String password;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer value) {
		this.id = value;
	}
	
	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String value) {
		this.loginName = value;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String value) {
		this.password = value;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
